package com.gupao.delegatedemo.leader;

import java.util.HashMap;
import java.util.Map;

public class Learder implements ITarget{

    private Map<String,ITarget> targetMap = new HashMap<>();

    public Learder(){
        this.targetMap.put("加密",new TargetA());
        this.targetMap.put("登录",new TargetB());
    }

    @Override
    public void doing(String command) {
        this.targetMap.get(command).doing(command);
    }
}
